package com.beiding.my.query;

import java.util.HashMap;
import java.util.Map;

//参数占位符
public class ParamHolder {

    private int p = 1;

    private Map<String, Object> params = new HashMap<>();

    public String set(Object value) {
        String id = "p" + (p++);
        params.put(id, value);
        return ":" + id;
    }

    public Map<String, Object> getParams() {
        return params;
    }
}
